package net.lab1024.sa.admin.module.business.yct.yctproductinstructions.domain.form;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;
import net.lab1024.sa.base.common.json.deserializer.DictValueVoDeserializer;
import net.lab1024.sa.base.common.json.deserializer.FileKeyVoDeserializer;
import net.lab1024.sa.base.common.json.serializer.FileKeyVoSerializer;
import org.hibernate.validator.constraints.Length;

/**
 * 易齿通产品说明书 新建表单
 *
 * @Author zhangben
 * @Date 2024-09-11 14:23:05
 * @Copyright yct
 */

@Data
public class YctProductInstructionsAddForm {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long instructionsId;

    @Schema(description = "启用1启用 2不启用", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "启用1启用 2不启用 不能为空")
    private Long instructionsType;

    @Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "产品名称 不能为空")
    private String name;

    @Schema(description = "产品简称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "产品简称 不能为空")
    private String nameAs;

    @Schema(description = "产品简述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "产品简述 不能为空")
    private String productRemark;

    @Schema(description = "说明文本内容", requiredMode = Schema.RequiredMode.REQUIRED)
    private String contentTextRemark;

    @Schema(description = "说明html内容", requiredMode = Schema.RequiredMode.REQUIRED)
    private String contentHtmlRemark;

    @Schema(description = "使用文本内容", requiredMode = Schema.RequiredMode.REQUIRED)
    private String contentTextUse;

    @Schema(description = "使用html内容", requiredMode = Schema.RequiredMode.REQUIRED)
    private String contentHtmlUse;

    @Schema(description = "启用1启用 2不启用", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "启用1启用 2不启用 不能为空")
    private Long attachmentVideoType;

    @Schema(description = "页面浏览量，传说中的pv", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer pageViewCount;

    @Schema(description = "用户浏览量，传说中的uv", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer userViewCount;

    @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "排序 不能为空")
    private String sort;

    @Schema(description = "删除", requiredMode = Schema.RequiredMode.REQUIRED)
    private Boolean deletedFlag;

    @Schema(description = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime updateTime;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime createTime;

    @Schema(description = "视频附件,多个英文逗号分隔|可选")
    @Length(max = 1000, message = "最多1000字符")
    @JsonDeserialize(using = FileKeyVoDeserializer.class)
    private String attachmentVideo;

    @Schema(description = "主图附件,多个英文逗号分隔|可选")
    @JsonSerialize(using = FileKeyVoSerializer.class)
    @JsonDeserialize(using = FileKeyVoDeserializer.class)
    private String attachmentPic;


}